package com.nacrtstudio.webgiftshop.model.shop.beans;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import com.nacrtstudio.webgiftshop.core.beans.BaseBean;
import com.nacrtstudio.webgiftshop.model.shop.Cart;
import com.nacrtstudio.webgiftshop.model.shop.CartItem;
import com.nacrtstudio.webgiftshop.model.shop.Gift;

@Entity
public class CartItemBean extends BaseBean implements CartItem{
	private Long CartItemId;
	private Gift gift;
	private Cart cart;
	private int qty;
	
	public Long getCartItemId() {
		return CartItemId;
	}
	public void setCartItemId(Long cartItemId) {
		CartItemId = cartItemId;
	}
	@ManyToOne(targetEntity=GiftBean.class)
	public Gift getGift() {
		return gift;
	}
	public void setGift(Gift gift) {
		this.gift = gift;
	}
	@ManyToOne(targetEntity=CartBean.class)
	public Cart getCart() {
		return cart;
	}
	public void setCart(Cart cart) {
		this.cart = cart;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
}
